#!/bin/bash
:<<EOF
# author:菜鸟教程
# url:www.runoob.com

EOF


set -e
set -o



num_array=(  1   2   3)

str_array=("shit"  "fuck"   "no")

char_array=('a'  'b'  'c');



echo   ${num_array[0]}
echo   ${num_array[1]}
echo   ${num_array[2]}
echo   "num  of  num_array is    ${#num_array[@]}"


echo   ${str_array[0]}
echo   ${str_array[1]}
echo   ${str_array[2]}

echo   "num  of  str_array   is    ${#str_array[*]}"

echo  ${char_array[0]}
echo  ${char_array[1]}
echo  ${char_array[2]}


obj_array=(d 11 "C" abcd )

echo "第一个元素为: ${obj_array[0]}"
echo "第二个元素为: ${obj_array[1]}"
echo "第三个元素为: ${obj_array[2]}"
echo "第四个元素为: ${obj_array[3]}"


array=(bill   chen  bai   hu);
echo "第一个元素为: ${array[0]}"
echo "第二个元素为: ${array[1]}"
echo "第三个元素为: ${array[2]}"
echo "第四个元素为: ${array[3]}"

num=${#array[@]}
echo  " $num   "
echo  "num=${#array[@]}"
echo  "num="${#array[*]}




